﻿using Adnc.Application.Shared.Dtos;
using Adnc.Application.Shared.Interceptors;
using Adnc.Application.Shared.Services;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WYT.Usr.Application.Contracts.Dtos.Wallet;

namespace WYT.Usr.Application.Contracts.Services
{
    /// <summary>
    /// 钱包服务
    /// </summary>
    public interface IWalletAppService : IAppService
    {
        /// <summary>
        /// 获取用户余额
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<AppSrvResult<WalletDto>> GetUserWallet(long userId);

        /// <summary>
        /// 钱包支付
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [UnitOfWork]
        Task<AppSrvResult<bool>> WalletPayment(WalletPaymentDto input);

        /// <summary>
        /// 获取用户钱包日志
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task<AppSrvResult<PageModelDto<WalletLogListDto>>> GetWalletLogs(long userId, WalletLogSearchPagedDto Input);

        /// <summary>
        /// 用户收益
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="start"></param>
        /// <param name="end"></param>
        /// <returns></returns>
        Task<AppSrvResult<UseIncomeDto>> GetIncomeInfoAsync(long userId, DateTime start, DateTime end);

        /// <summary>
        /// 用户提现申请
        /// </summary>
        /// <returns></returns>
        [UnitOfWork]
        Task<AppSrvResult<bool>> UserWithdrawalApplication(long userId, WithdrawalDto input);

        /// <summary>
        /// 转账
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        [UnitOfWork]
        Task<AppSrvResult<bool>> TransferAccounts(long userId, WalletTransferAccountsDto input);
    }
}
